fix: prevent replayed signed reads#386
Open
matthias-wright wants to merge 5 commits into
Open
Conversation
Signed-read seismic transactions were previously rejected only at mempool admission. Block producers ingesting txs through non-mempool paths — builder API, private orderflow, or the EIP-712 `TypedData` variant of `eth_sendRawTransaction` which bypassed `Decodable2718` — could include a signed-read tx directly, letting an attacker who intercepted a signed `eth_call` payload replay it as an actual state-changing transaction. Consumes seismic-alloy's decoder-level rejection (#104, c1ce533) and updates this crate accordingly: * `send_raw_transaction`: the `TypedData` arm now decodes the EIP-712 payload into a `SeismicTxEnvelope`, re-encodes as RLP, and delegates to `EthTransactions::send_raw_transaction(bytes)`. All signed-tx ingress now funnels through a single `Decodable2718::typed_decode` pipeline, so decode-time invariants (including the new signed-read rejection) apply uniformly. Removes the parallel pool-admission pipeline that was the bypass. * For `eth_call`'s Bytes path, a new `recover_raw_seismic_call_tx` helper uses seismic-alloy's permissive `decode_2718_permit_seismic_calls` so legitimate signed-read payloads are still accepted. * Removes the now-redundant mempool-level `validate_signed_read_for_write` check and its associated error variant. Depends on seismic-alloy PR #104; the \`rev\` in Cargo.toml is temporary and should be bumped to the merged-main commit before landing.
Contributor
|
Refactors Seismic RPC to use upstream reth's Phase 1
Phase 2
Phase 3
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prevents replays of signed reads by validating
recent_block_hashandexpires_at_blockoneth_call/eth_estimateGas/eth_simulateV1before decryption.Changes:
validate_seismic_freshnesshelper, called fromsigned_read_to_plaintext_txso all three signed-read endpoint hit the same check.SEISMIC_TX_RECENT_BLOCK_LOOKBACKtoreth-seismic-primitives(txpool keeps a re-export) so RPC andpool share one variable.